﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace G.WeiBo
{
    public class ThemeHelp
    {
        public static string GetThemePath(ThemeType type)
        {
            string path = null;
            switch (type)
            {
                case ThemeType.White:
                    path = "/G.WeiBo;component/Themes/White.xaml";
                    break;
                default:
                    path = "/G.WeiBo;component/Themes/Black.xaml";
                    break;
            }
            return path;
        }

        public static ThemeType GetThemeType()
        {
            if (System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Contains("ThemeName"))
            {
                return (ThemeType)System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings["ThemeName"];
            }
            else
            {
                return ThemeType.Black;
            }
        }

        public static void SaveThemeType(ThemeType type)
        {
            System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings["ThemeName"] = type;
            System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Save();
        }
    }
}
